<template>
	<!-- 权益 -->
	<view class="nft_equity" :style="{'background':bacg}">
		<!-- 顶部权限详情信息 -->
		<view class="top_info">
			<view class="cover">
				<image src="../../static/img/logo.png" mode=""></image>
			</view>
			<view class="content">
				<view class="title">
					{{item.name}}
				</view>
				<view class="description">
					{{item.description}}
				</view>
			</view>
		</view>
		<!-- 底部按钮信息 -->
		<view class="bottom_btn">
			<view class="">类型: {{item.type == '0' ? '票务' : '商品'}}</view>
			<view class="btn">
				<u-button type="primary" text="查看详情" size="small" shape="circle" class="custom-style"
					iconColor="#A9A9A9" @tap="goToNftEquityDetail"></u-button>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		props: {
			item: {
				type: Object
			},
			// 组件总背景颜色
			bacg: {
				type: String,
				default: '#3c3b3a',
			},
		},
		created() {
			console.log(this.item)
		},
		methods: {
			goToNftEquityDetail() {
				uni.navigateTo({
					url: "/pages/nft/nftExhibitionDetail?serialNo=" + this.item.serialNo +
						"&exhibitionType=" +
						"benefit"
				})
			}
		}
	}
</script>
<style lang="scss">
	.nft_equity {

		width: 94%;
		margin: 0 auto;
		border-radius: 10rpx;
		background-color: #3c3b3a;
		overflow: hidden;
		margin-top: 40rpx;

		// 上面展示信息
		.top_info {
			display: flex;
			justify-content: space-between;
			padding: 20rpx;

			// 左侧封面图
			.cover {
				width: 100rpx;
				height: 100rpx;
				border-radius: 50%;
				overflow: hidden;

				image {
					width: 100%;
					height: 100%;
				}
			}

			// 右侧内容区域
			.content {
				padding: 8rpx 30rpx;
				flex-grow: 1;
				color: #fff;

				.title {
					font-size: 32rpx;
				}

				.description {
					margin-top: 20rpx;
				}
			}
		}

		// 下面按钮
		.bottom_btn {
			border-top: 1px solid #353333;
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 60rpx;
			padding: 20rpx;
			color: #fff;
			font-size: 28rpx;

			.btn {
				width: 160rpx;

				.custom-style {
					background-color: #62594c;
					border-color: #fff;
				}
			}
		}
	}
</style>
